import request from '@/utils/request'

// 查询变电站设备信息列表
export function listSubstationDevice(query) {
  return request({
    url: '/substation/substationDevice/list',
    method: 'get',
    params: query
  })
}

// 获取变电站设备的保护装置列表
export function getProtectDeviceList(query) {
  return request({
    url: '/substation/substationDevice/protectDeviceList',
    method: 'get',
    params: query
  })
}

// 查询变电站设备信息详细
export function getSubstationDevice(id) {
  return request({
    url: '/substation/substationDevice/' + id,
    method: 'get'
  })
}

// 新增变电站设备信息
export function addSubstationDevice(data) {
  return request({
    url: '/substation/substationDevice',
    method: 'post',
    data: data
  })
}

// 导入变电站设备信息
export function importData(data) {
  return request({
    url: '/substation/substationDevice/importData',
    method: 'post',
    data: data
  })
}

// 修改变电站设备信息
export function updateSubstationDevice(data) {
  return request({
    url: '/substation/substationDevice',
    method: 'put',
    data: data
  })
}

// 删除变电站设备信息
export function delSubstationDevice(id) {
  return request({
    url: '/substation/substationDevice/' + id,
    method: 'delete'
  })
}
